package api_model

import "time"

func CreateSysBrokerageAdjunFactory(sqlType string) *SysBrokerageAdjun {
	return &SysBrokerageAdjun{BaseModel: BaseModel{DB: UseDbConn(sqlType)}}
}

type SysBrokerageAdjun struct {
	BaseModel
	Id         int32     `gorm:"column:id;primary_key;AUTO_INCREMENT;NOT NULL" json:"id"`
	Key        string    `gorm:"column:key;NOT NULL;comment:'编码'" json:"key"`
	Project    string    `gorm:"column:project;NOT NULL;comment:'增值项'" json:"project"`
	Bcost      string    `gorm:"column:bcost;NOT NULL;comment:'商家'" json:"bcost"`
	Scost      string    `gorm:"column:scost;NOT NULL;comment:'买手'" json:"scost"`
	Pcost      string    `gorm:"column:pcost;NOT NULL;comment:'代理'" json:"pcost"`
	TaskType   string    `gorm:"column:task_type;NOT NULL;comment:'订单类型,0 浏览单 1成交单 2 媒体单 3 系统全局'" json:"task_type"`
	State      string    `gorm:"column:state;default:0;NOT NULL;comment:'是否开启， 0 开启，1关闭'" json:"state"`
	CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"create_time"`
}

func (s *SysBrokerageAdjun) TableName() string {
	return "sys_brokerage_adjun"
}
